﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ShellInfrastructure;
using Microsoft.Practices.Unity; 
using Microsoft.Practices.Prism.Regions;
using ModuleExternalProducers.Views;
using ModuleExternalProducers.ViewModels;
 

namespace ModuleExternalProducers
{
    public class ExternalProducersModule : ModulesInfrastructure.SharedModule
    {
        protected override void RegisterViewsInRegions()
        {
            RegionManager.RegisterViewWithRegion(RegionNames.LeftRegionName, () => UnityContainer.Resolve<IProducersView>());

        }

        protected override void RegisterTypesDependencies()
        {
            UnityContainer.RegisterType<IProducersView, ProducersView>(new ContainerControlledLifetimeManager());
            UnityContainer.RegisterType<IProducersViewModel, ExternalProducersViewModel>(new ContainerControlledLifetimeManager());
        }
    }
}
